## 使用ORK的渲染工具
set(pjn LinemodTrainerTest)
cmake_minimum_required(VERSION 3.5)
set(home /home/de/testCode/tensorflowVision)

FIND_PACKAGE(object_recognition_renderer REQUIRED)
FIND_PACKAGE(opencv_candidate REQUIRED)
FIND_PACKAGE(Open3D REQUIRED PATHS "~/Open3D/build/CMakeFiles")
list(APPEND patch_linemod_lib ${Open3D_LIBRARIES})

# add_definitions(-std=c++11)
set (CMAKE_CXX_STANDARD 14)

# aux_source_directory(. SRCLIST)
include_directories(${pjn} 
    ${object_recognition_renderer_INCLUDE_DIRS}
    /opt/ros/kinetic/include/opencv-3.3.1-dev
    .
    /usr/local/include/eigen3
    ${home}/linemodLevelup
)
link_directories(${pjn} 
    /opt/ros/kinetic/lib/x86_64-linux-gnu
    /usr/lib/x86_64-linux-gnu
)

# ADD_LIBRARY(LinemodTrainer linemod_trainer.cpp)
add_executable(${pjn} ${home}/linemod_up/train/linemod_trainer_tool.cpp ${home}/linemodLevelup/linemodLevelup.cpp ${home}/linemod_up/train/test.cpp)

target_link_libraries(${pjn} 
    ${opencv_candidate_LIBRARIES}
    ${object_recognition_renderer_LIBRARIES}
    -lboost_filesystem -lboost_system
    -lyaml-cpp
    -lopencv_imgcodecs3 -lopencv_imgproc3 -lopencv_core3
    ${patch_linemod_lib}
    -lgomp
)

# INSTALL(TARGETS LinemodTrainer DESTINATION lib)
